package com.ssn.jse.io;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CharStream {
	public static void main(String[] args) {
		FileReader fr=null;
		FileWriter fw=null;
		char[] c=new char[1024];
		double a=0;
		if(a==a){ 
			System.out.println("idential");
			a=Double.NaN;
		}
		try {
			fr=new FileReader("d:/a.txt");
			fw=new FileWriter("e:/a.txt");
			int n=0;
			while ((n=fr.read(c))!=-1) {
				fw.write(c,0,n);
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			try {
				fr.close();fw.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}
	}
}
